<template>
  <van-nav-bar title="详情" />
   <div>

   </div>
<van-action-bar>
  <van-action-bar-icon icon="chat-o" text="客服" @click="onClickIcon" />
  <van-action-bar-icon icon="cart-o" text="购物车" @click="onClickIcon" />
  <van-action-bar-icon icon="shop-o" text="店铺" @click="onClickIcon" />
  <van-action-bar-button type="danger" text="加入购物车" @click="onClickButton" />
</van-action-bar>
</template>

<script setup>
import { ref } from 'vue';
import { detailApi } from '@/api/api'
import { useRoute } from 'vue-router';
import{ useRouter } from 'vue-router'
const router =useRouter()
const route =useRoute()
const detailApiData = ref([])
detailApi(route.params.goods_id).then(res => {
    console.log('详情的数据', res);
    detailApiData.value=res.data.message
})
const onClickButton=()=>{
     router.push('/home/cart')
}
</script>
<style lang="scss" scoped>

</style>